package com.android.jingweiapp.widget;

import android.text.TextUtils;
import android.widget.Toast;

import com.android.jingweiapp.application.ApplicationContext;


/**
 * Created by cuiwenrui-pc on 15/8/31.
 */
public class MyToast {
    private static MyToast ourInstance = new MyToast();
    private Toast mToast;

    private MyToast() {
        mToast = Toast.makeText(ApplicationContext.getInstance(), " ", Toast.LENGTH_SHORT);
    }

    public static MyToast getInstance() {
        return ourInstance;
    }

    public void show(String message) {
        if (TextUtils.isEmpty(message)) {
            return;
        }
        mToast.setText(message);
        mToast.show();
    }

    public void show(int message) {
        mToast.setText(message);
        mToast.show();
    }
}
